package com.ruoyi.wms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wms.mapper.WmsMaterialStockMapper;
import com.ruoyi.wms.domain.WmsMaterialStock;
import com.ruoyi.wms.service.IWmsMaterialStockService;
import com.ruoyi.common.core.text.Convert;

/**
 * 物料现存量Service业务层处理
 * 
 * @author chao
 * @date 2024-07-23
 */
@Service
public class WmsMaterialStockServiceImpl implements IWmsMaterialStockService 
{
    @Autowired
    private WmsMaterialStockMapper wmsMaterialStockMapper;

    /**
     * 查询物料现存量
     * 
     * @param id 物料现存量主键
     * @return 物料现存量
     */
    @Override
    public WmsMaterialStock selectWmsMaterialStockById(Long id)
    {
        return wmsMaterialStockMapper.selectWmsMaterialStockById(id);
    }

    /**
     * 查询物料现存量列表
     * 
     * @param wmsMaterialStock 物料现存量
     * @return 物料现存量
     */
    @Override
    public List<WmsMaterialStock> selectWmsMaterialStockList(WmsMaterialStock wmsMaterialStock)
    {
        return wmsMaterialStockMapper.selectWmsMaterialStockList(wmsMaterialStock);
    }

    /**
     * 批量删除物料现存量
     * 
     * @param ids 需要删除的物料现存量主键
     * @return 结果
     */
    @Override
    public int deleteWmsMaterialStockByIds(String ids)
    {
        return wmsMaterialStockMapper.deleteWmsMaterialStockByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除物料现存量信息
     * 
     * @param id 物料现存量主键
     * @return 结果
     */
    @Override
    public int deleteWmsMaterialStockById(Long id)
    {
        return wmsMaterialStockMapper.deleteWmsMaterialStockById(id);
    }

}
